package creational.prototype;

import lombok.extern.slf4j.Slf4j;

/**
 * @author binbin
 * @since 2022/10/6 14:59
 */
@Slf4j
public class MailUtil {

    public static void sendMail(Mail mail) {
        String mailBody = Mail.MAIL_BODY;
        mailBody = mailBody.replace("{0}", mail.getSender())
                .replace("{1}", mail.getReceiver())
                .replace("{2}", mail.getTitle())
                .replace("{3}", mail.getContent());
        log.info(mailBody);
    }
}
